/*
	
*/
console.log('launch unitTest.js');
/* INIT */
var headerRow = ['XXX',456];
var parameters = [['XX',3,'btn'],['YY',3.3,'btn']];

//console.log(getHeaderRow(headerRow));

/* BEGIN TEST */
assert('getHeaderRow()', '<tr><th>XXX</th><th>456</th></tr>' === getHeaderRow(headerRow));
assert('getRows()', '<tr><td>XX</td><td>3</td><td>btn</td></tr><tr><td>YY</td><td>3.3</td><td>btn</td></tr>' === getRows(parameters));
/* END TEST */


function assert(message, expr){
	if(!expr){
		output(false, message);
		throw new Error(message);
	}
	output(true, message);
}
 
function output(result, message){
	var p = document.createElement('p');
	message += result ? ' : SUCCESS' : ' : FAILURE';
	p.style.color = result ? '#0c0' : '#c00';
	p.innerHTML = message;
	document.body.appendChild(p);
}

function includeScript(file)
{
	var script = document.createElement('script');
	script.type = "text/javascript";
	script.src = file;
	document.body.appendChild(script);
}
 
 
 
